package com.ruoyi.know.service.impl;

import com.ruoyi.know.domain.CommunitySections;
import com.ruoyi.know.mapper.CommunitySectionsMapper;
import com.ruoyi.know.service.ICommunitySectionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 社区板块Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-10
 */
@Service
public class CommunitySectionsServiceImpl implements ICommunitySectionsService
{
    @Autowired
    private CommunitySectionsMapper communitySectionsMapper;

    /**
     * 查询社区板块
     *
     * @param sectionId 社区板块主键
     * @return 社区板块
     */
    @Override
    public CommunitySections selectCommunitySectionsBySectionId(Long sectionId)
    {
        return communitySectionsMapper.selectCommunitySectionsBySectionId(sectionId);
    }

    /**
     * 查询社区板块列表
     *
     * @param communitySections 社区板块
     * @return 社区板块
     */
    @Override
    public List<CommunitySections> selectCommunitySectionsList(CommunitySections communitySections)
    {
        return communitySectionsMapper.selectCommunitySectionsList(communitySections);
    }

    /**
     * 新增社区板块
     *
     * @param communitySections 社区板块
     * @return 结果
     */
    @Override
    public int insertCommunitySections(CommunitySections communitySections)
    {
        return communitySectionsMapper.insertCommunitySections(communitySections);
    }

    /**
     * 修改社区板块
     *
     * @param communitySections 社区板块
     * @return 结果
     */
    @Override
    public int updateCommunitySections(CommunitySections communitySections)
    {
        return communitySectionsMapper.updateCommunitySections(communitySections);
    }

    /**
     * 批量删除社区板块
     *
     * @param sectionIds 需要删除的社区板块主键
     * @return 结果
     */
    @Override
    public int deleteCommunitySectionsBySectionIds(Long[] sectionIds)
    {
        return communitySectionsMapper.deleteCommunitySectionsBySectionIds(sectionIds);
    }

    /**
     * 删除社区板块信息
     *
     * @param sectionId 社区板块主键
     * @return 结果
     */
    @Override
    public int deleteCommunitySectionsBySectionId(Long sectionId)
    {
        return communitySectionsMapper.deleteCommunitySectionsBySectionId(sectionId);
    }
}
